﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PMS.ENT;
using PMS.DAL;

namespace PMS.BLL
{
    public class ScheduleStatementBLL
    {
        #region Get
        public static ScheduleStatementENT GetScheduleStatementByID(int scheduleStatementID)
        {
            try
            {
                return ScheduleStatementDAL.GetScheduleStatementByID(scheduleStatementID);
            }
            catch (Exception)
            {
                throw;
            }
        }

        public static ScheduleStatementCollection GetScheduleStatementList(string scheduleStatementName, int projectID, int scheduleID, int userID, string status, string orderBy, string orderDirection, int page, int pageSize, out int totalRecords)
        {
            try
            {
                return ScheduleStatementDAL.GetScheduleStatementList(scheduleStatementName, projectID, scheduleID, userID, status, orderBy, orderDirection, page, pageSize, out totalRecords);
            }
            catch (Exception)
            {
                throw;
            }
        }

        public static ScheduleStatementENT GetScheduleStatementByGroupAndScheduleItem(int groupID,int scheduleItemID,out int scheduleID)
        {
            try
            {
                return ScheduleStatementDAL.GetScheduleStatementByGroupAndScheduleItem(groupID, scheduleItemID,out scheduleID);
            }
            catch (Exception)
            {
                throw;
            }
        }

        #endregion

        #region Insert Update Delete Confirm

        public static int InsertScheduleStatement(ScheduleStatementENT scheduleStatement)
        {
            try
            {
                return ScheduleStatementDAL.InsertScheduleStatement(scheduleStatement);
            }
            catch (Exception)
            {

                throw;
            }
        }

        public static int UpdateScheduleStatement(ScheduleStatementENT scheduleStatement)
        {
            try
            {
                return ScheduleStatementDAL.UpdateScheduleStatement(scheduleStatement);
            }
            catch (Exception)
            {

                throw;
            }
        }

        public static int DeleteScheduleStatement(string scheduleStatementID, int userID)
        {
            try
            {
                return ScheduleStatementDAL.DeleteScheduleStatement(scheduleStatementID, userID);
            }
            catch (Exception)
            {

                throw;
            }
        }

        public static int ConfirmScheduleStatement(string scheduleStatementID, int userID)
        {
            try
            {
                return ScheduleStatementDAL.ConfirmScheduleStatement(scheduleStatementID, userID);
            }
            catch (Exception)
            {

                throw;
            }
        }


        #endregion


    }
}
